package com.javalong.affairs.module.renwujinzhang.activity.send;

import android.content.Context;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;

import com.javalong.affairs.R;
import com.javalong.affairs.base.constant.BundleKey;
import com.javalong.affairs.base.constant.RequestCode;
import com.javalong.affairs.base.manager.IntentManager;
import com.javalong.affairs.module.renwujinzhang.activity.WatchRunTaskActivity;
import com.javalong.affairs.module.renwujinzhang.activity.supervise.SuggestEditContentActivity;
import com.javalong.affairs.module.renwujinzhang.model.Task;

/**
 * Created by javalong on 2016/5/28.
 * 发送列表 进行中任务
 */
public class WatchSendRunningActivity extends WatchRunTaskActivity {

    public static void toThisActivity(Context context, Task task) {
        Intent intent = new Intent();
        intent.setClass(context, WatchSendRunningActivity.class);
        intent.putExtra(BundleKey.TASK, task);
        context.startActivity(intent);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.menu_send_running_task, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case R.id.action_dosuggest:
                //提出建议
                IntentManager.doActivityForResult(this,
                        SuggestEditContentActivity.class, RequestCode.EDITSUGGEST);
                break;
        }
        return super.onOptionsItemSelected(item);
    }

}
